package android.moodle;

import android.app.Activity;
import android.content.Intent;
import android.javaClasses.Client;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

/**
 * Created by IntelliJ IDEA.
 * User: michelle
 * Date: 5/1/11
 * Time: 11:04 AM
 * To change this template use File | Settings | File Templates.
 */
public class JoinGameActivity extends Activity {
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.join_game_layout);
    }

    public void joinGame(View v) {
        TextView playername = (TextView)findViewById(R.id.joinGameplayerName);
        TextView ip = (TextView)findViewById(R.id.ipAddress);
        String ipAddress = ip.getText().toString().trim();
        String player = playername.getText().toString();

        Intent i = new Intent(this, ClientActivity.class);
        i.putExtra("serverAddress", ipAddress);
        i.putExtra("playerName", player);
        startActivity(i);
    }

}